import * as d3 from "d3";

export function ButtonGroupManager(ctx) {

  let context = ctx;

  console.log(context);

  this.codeName = {
    delete: "delete"
  }

  this.toolbarData = [
    { name: "编辑", value: 1, code: "editBase" },
    { name: "展开", value: 1, code: "options" },
    { name: "追加", value: 1, code: "append" },
    { name: "连线", value: 1, code: "link" },
    { name: "删除", value: 1, code: this.codeName.delete }
  ];

  // let context = ctx;

  /**---------------------------------------------------------------------------
   * 展示、关闭按钮组
   */
  this.showButtonGroup = function(node) {
    let out_buttongroup_id = ".out_buttongroup_" + node.uuid;
    d3.select(out_buttongroup_id)
      .style("visibility", "visible")
      .style("translate");
  }
  this.closeButtonGroup = function(node){
    let out_buttongroup_id = ".out_buttongroup_" + node.uuid;
    d3.select(out_buttongroup_id)
      .style("visibility", "hidden")
      .style("translate");
  }



}